package com.example.dllo.moondog.information.official;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.example.dllo.moondog.R;
import com.example.dllo.moondog.base.BaseActivity;

/**
 * Created by dllo on 16/3/3.
 */
public class OfficiialActivity extends BaseActivity{
    private WebView webView;
    private String id = "http://qt.qq.com/static/pages/news/phone/";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_strategy);
        webView = (WebView) findViewById(R.id.webView_strategy);

        Intent intent = getIntent();
        String key = intent.getStringExtra("key");
        String url = id + key;
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
        webView.loadUrl(url);
    }

}
